<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">
 	<!-- Contenido -->
 	<f:view>
    <h:head>
        <script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" type="text/css" media="all" />
    </h:head>
    <h:body>
	<h:outputText value="#{loginUsuarioMB.mensaje}" escape="false" />
        	
<!--    Link Login     -->
		<div id="login_modal" title="Login Usuario" style="display:none;">
			<ui:include src="LoginUsuario.xhtml" />
		</div>
<!--    Link Login     -->
<!--    Link Registro     -->
		<div id="registro_modal" title="Registro Usuario" style="display:none;">
			<ui:include src="RegistroUsuario.xhtml" />
		</div>
<!--    Link Registro     -->

        <script>
        	$('#login_link').click(function(e){
        		e.preventDefault;
        		dialog_ingreso();
        		return false;
     	   });
        	
        	$('#registro_link').click(function(e){
        		e.preventDefault;
        		dialog_registro();
        		return false;
     	   });
        	
        	function dialog_registro() {
       		 	$("#registro_modal").dialog({modal: true});
       			}
        	
        	function dialog_ingreso() {
        		 $("#login_modal").dialog({modal: true});
        		}
        </script>
    </h:body>
</f:view>
 	<!-- Fin Contenido -->
</ui:composition>